package com.sqtracker.recommender.dto;

import lombok.Data;
import java.util.Date;

@Data
public class UserBehaviorDTO {
    private String userId;
    private String torrentId;
    private String type;  // VIEW, LIKE, DOWNLOAD, RATE, REPORT
    private Integer rating;  // 1-5，仅当type为RATE时
    private Date timestamp = new Date();  // 默认为当前时间
    private Integer duration;  // 停留时间(秒)，仅适用于VIEW
    private BehaviorContext context = new BehaviorContext();

    @Data
    public static class BehaviorContext {
        private String referrer;  // 来源页面
        private String query;     // 搜索查询
        private String device;    // 设备类型
    }
}